<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../print.css" type="text/css" media="print">
<meta content="TreeIterator,de.polygonal.ds.TreeIterator,node,childData,childNode,data,appendChild,childEnd,childStart,childValid,down,hasNext,insertAfterChild,insertBeforeChild,next,nextChild,postorder,preorder,prependChild,prevChild,removeChild,root,start,toString,up,valid" name="keywords">
<title>de.polygonal.ds.TreeIterator</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'TreeIterator - AS3 Data Structures For Game Developers';
				var baseRef = '../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">AS3 Data Structures For Game Developers v1.04</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?de/polygonal/ds/TreeIterator.html&amp;de/polygonal/ds/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;TreeIterator</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class TreeIterator"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">de.polygonal.ds</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class TreeIterator</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implements</td><td><a href="Iterator.html">Iterator</a></td>
</tr>
</table>
<p></p>
  A tree iterator.
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#childData">childData</a> : *<div class="summaryTableDescription">[read-only]
   Returns the item the child iterator is pointing to.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#childNode">childNode</a> : <a href="../ds/TreeNode.html">TreeNode</a>
<div class="summaryTableDescription">[read-only]
   The current child node being referenced.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#data">data</a> : *<div class="summaryTableDescription">
   
   Grants access to the current item being referenced by the iterator.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#node">node</a> : <a href="../ds/TreeNode.html">TreeNode</a>
<div class="summaryTableDescription">
   The tree node being referenced.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#TreeIterator()">TreeIterator</a>(node:<a href="TreeNode.html">TreeNode</a> = null)</div>
<div class="summaryTableDescription">
   Initializes a tree iterator pointing to a given tree node.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#appendChild()">appendChild</a>(obj:*):void</div>
<div class="summaryTableDescription">
   Appends a child node to the child list.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#childEnd()">childEnd</a>():void</div>
<div class="summaryTableDescription">
   Moves the child iterator to the last child.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#childStart()">childStart</a>():void</div>
<div class="summaryTableDescription">
   Moves the child iterator to the first child.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#childValid()">childValid</a>():Boolean</div>
<div class="summaryTableDescription">
   Determines if the child iterator is valid.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#down()">down</a>():void</div>
<div class="summaryTableDescription">
   Moves the iterator down by one level of the tree, so that it points
   to the first child of the current tree node.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#hasNext()">hasNext</a>():Boolean</div>
<div class="summaryTableDescription">
   
   Checks if a next item exists.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#insertAfterChild()">insertAfterChild</a>(obj:*):void</div>
<div class="summaryTableDescription">
   Inserts a child node after the current child node.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#insertBeforeChild()">insertBeforeChild</a>(obj:*):void</div>
<div class="summaryTableDescription">
   Inserts a child node before the current child node.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#next()">next</a>():*</div>
<div class="summaryTableDescription">
   
   Returns the current item and moves the iterator to the next item
   in the collection.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#nextChild()">nextChild</a>():void</div>
<div class="summaryTableDescription">
   Moves the child iterator forward by one position.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#postorder()">postorder</a>(node:<a href="TreeNode.html">TreeNode</a>, process:Function):void</div>
<div class="summaryTableDescription">[static]
   Performs a <i>postorder traversal</i> on a tree.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#preorder()">preorder</a>(node:<a href="TreeNode.html">TreeNode</a>, process:Function):void</div>
<div class="summaryTableDescription">[static]
   Performs a <i>preorder traversal</i> on a tree.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#prependChild()">prependChild</a>(obj:*):void</div>
<div class="summaryTableDescription">
   Prepends a child node to the child list.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#prevChild()">prevChild</a>():void</div>
<div class="summaryTableDescription">
   Moves the child iterator back by one position.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeChild()">removeChild</a>():void</div>
<div class="summaryTableDescription">
   Unlinks the current child node from the tree.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#root()">root</a>():void</div>
<div class="summaryTableDescription">
   Moves the iterator to the root of the tree.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#start()">start</a>():void</div>
<div class="summaryTableDescription">
   Resets the vertical iterator so that it points to the root of the
   tree.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#toString()">toString</a>():String</div>
<div class="summaryTableDescription">
   Prints out a string representing the current object.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#up()">up</a>():void</div>
<div class="summaryTableDescription">
   Moves the iterator up by one level of the tree, so that it points to
   the parent of the current tree node.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#valid()">valid</a>():Boolean</div>
<div class="summaryTableDescription">
   Checks if the node is valid.</div>
</td><td class="summaryTableOwnerCol">TreeIterator</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="childData"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">childData</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>childData:*</code>&nbsp;&nbsp;[read-only]<p>
   Returns the item the child iterator is pointing to.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get childData():*</code>
<br>
</div>
<a name="childNode"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">childNode</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>childNode:<a href="../ds/TreeNode.html">TreeNode</a></code>&nbsp;&nbsp;[read-only]<p>
   The current child node being referenced.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get childNode():<a href="../ds/TreeNode.html">TreeNode</a></code>
<br>
</div>
<a name="data"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">data</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>data:*</code>&nbsp;&nbsp;[read-write]<p>
   
   Grants access to the current item being referenced by the iterator.
   This provides a quick way to read or write the current data.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get data():*</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set data(value:*):void</code>
<br>
</div>
<a name="node"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">node</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var node:<a href="../ds/TreeNode.html">TreeNode</a></code><p>
   The tree node being referenced.
   </p></div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="TreeIterator()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">TreeIterator</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function TreeIterator(node:<a href="TreeNode.html">TreeNode</a> = null)</code><p>
   Initializes a tree iterator pointing to a given tree node.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">node</span>:<a href="TreeNode.html">TreeNode</a></code> (default = <code>null</code>)<code></code> &mdash; The node the iterator should point to.
   </td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="appendChild()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">appendChild</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function appendChild(obj:*):void</code><p>
   Appends a child node to the child list.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">obj</span>:*</code> &mdash; The data to append as a child node.
   </td>
</tr>
</table>
</div>
<a name="childEnd()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">childEnd</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function childEnd():void</code><p>
   Moves the child iterator to the last child.
   </p></div>
<a name="childStart()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">childStart</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function childStart():void</code><p>
   Moves the child iterator to the first child.
   </p></div>
<a name="childValid()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">childValid</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function childValid():Boolean</code><p>
   Determines if the child iterator is valid.
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code></td>
</tr>
</table>
</div>
<a name="down()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">down</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function down():void</code><p>
   Moves the iterator down by one level of the tree, so that it points
   to the first child of the current tree node.
   </p></div>
<a name="hasNext()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">hasNext</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function hasNext():Boolean</code><p>
   
   Checks if a next item exists.
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; True if a next item exists, otherwise false.
   </td>
</tr>
</table>
</div>
<a name="insertAfterChild()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">insertAfterChild</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function insertAfterChild(obj:*):void</code><p>
   Inserts a child node after the current child node.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">obj</span>:*</code> &mdash; The data to insert as a child node.
   </td>
</tr>
</table>
</div>
<a name="insertBeforeChild()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">insertBeforeChild</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function insertBeforeChild(obj:*):void</code><p>
   Inserts a child node before the current child node.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">obj</span>:*</code> &mdash; The data to insert as a child node.
   </td>
</tr>
</table>
</div>
<a name="next()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">next</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function next():*</code><p>
   
   Returns the current item and moves the iterator to the next item
   in the collection. Note that the next() method returns the
   <i>first</i> item in the collection when it's first called.
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>*</code> &mdash; The next item in the collection.
   </td>
</tr>
</table>
</div>
<a name="nextChild()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">nextChild</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function nextChild():void</code><p>
   Moves the child iterator forward by one position.
   </p></div>
<a name="postorder()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">postorder</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function postorder(node:<a href="TreeNode.html">TreeNode</a>, process:Function):void</code><p>
   Performs a <i>postorder traversal</i> on a tree.
   This processes the current node after its children.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">node</span>:<a href="TreeNode.html">TreeNode</a></code> &mdash;    The tree node to start from.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">process</span>:Function</code> &mdash; A process function applied to each traversed node.
   </td>
</tr>
</table>
</div>
<a name="preorder()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">preorder</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function preorder(node:<a href="TreeNode.html">TreeNode</a>, process:Function):void</code><p>
   Performs a <i>preorder traversal</i> on a tree.
   This processes the current tree node before its children.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">node</span>:<a href="TreeNode.html">TreeNode</a></code> &mdash;    The tree node to start from.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">process</span>:Function</code> &mdash; A process function applied to each traversed node.
   </td>
</tr>
</table>
</div>
<a name="prependChild()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">prependChild</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function prependChild(obj:*):void</code><p>
   Prepends a child node to the child list.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">obj</span>:*</code> &mdash; The data to prepend as a child node.
   </td>
</tr>
</table>
</div>
<a name="prevChild()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">prevChild</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function prevChild():void</code><p>
   Moves the child iterator back by one position.
   </p></div>
<a name="removeChild()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeChild</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function removeChild():void</code><p>
   Unlinks the current child node from the tree.
   This does not delete the node.
   </p></div>
<a name="root()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">root</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function root():void</code><p>
   Moves the iterator to the root of the tree.
   </p></div>
<a name="start()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">start</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function start():void</code><p>
   Resets the vertical iterator so that it points to the root of the
   tree. Also make sures the horizontal iterator points to the first
   child.
   </p></div>
<a name="toString()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">toString</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function toString():String</code><p>
   Prints out a string representing the current object.
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code> &mdash; A string representing the current object.
   </td>
</tr>
</table>
</div>
<a name="up()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">up</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function up():void</code><p>
   Moves the iterator up by one level of the tree, so that it points to
   the parent of the current tree node.
   </p></div>
<a name="valid()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">valid</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function valid():Boolean</code><p>
   Checks if the node is valid.
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code></td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright">Copyright 2007-2008 Michael Baczynski | POLYGONAL</center>
</div>
</body>
</html>
<!--Copyright 2007-2008 Michael Baczynski | POLYGONAL-->
